GetTransactionState
Definition:
GetTransactionState(tag)
Description:
Obtain the current status of a specified asynchronous data transfer.
Platforms:
All
Parameters:
tag - required
This parameter is not currently used. Enter an empty string, "", to obtain the status of the currently active asynchronous data transaction.
Returns:
"Pending"
Not connected to App Server but transaction waiting to connect or trying to connect.
"Sending"
Sending data to the App Server.
"Waiting"
State in between Sending and Receiving.
"Receiving"
Receiving data from the App Server.
"Completed"
The transfer has finished and the App Server has sent a reply to the Client.
Note, however, that this state does not automatically mean that all records transferred successfully. You can use the synchronise error checking Methods to check for errors relating to updating and inserting tables and records.
If this state is reported, the OnAsyncCompletion Event will be triggered with a Success value of "True".
"Failed"
A problem occurred performing the data transfer and the transfer has not completed successfully.
Things which might cause a Failure to occur include access denied or permissions errors, unable to find data source etc.
If this state is reported, the OnAsyncCompletion Event will be triggered with a Success value of "False".
"Cancelled"
Transfer cancelled using the CancelTransaction Method within a Script.
"Inactive"
No transaction in progress.
Before any data transfers are initiated and after a triggered OnAsyncCompletion Event has completed, the transfer state will report as "Inactive".
Notes:
-
This Method will return the current status of an ongoing asynchronous data transaction initiated by a previous call to Synchronise. You cannot use this Method with synchronous transfers.
-
You can use this Method in conjunction with a Timer Control or the Global Timer to check on the progress of a transfer. If the Digitise Apps Client is unable to communicate with the App Server for any reason, such as loss of signal, the Client will automatically retry until the transfer resumes or is cancelled within a Script. GetTransactionState will allow you to monitor progress so that, for example, you can provide the user with information and the opportunity to cancel a transaction in the event of a delay.
See also: